<div ng-include="sys_html('common/head')"></div>
<style>
	.active{
	    border-bottom: 1px solid #FF6260;
	    color: #FF6260;
}
.in-ti{
	margin-top: 0.1rem;
}
#imgone {
	display: inline-block;
	width: 0.5rem;
	height: 0.5rem;
}
.img-tw{
	display: inline-block;
	width: 0.5rem;
	height: 0.5rem;
	margin-right: 0.1rem;
}
</style>

	<div class="g-flexviews pages" id="page1">
		<!--头部-->
		<header class="head-box" style="background:#FE6260; top: 0px;width: 100%;height: 1rem">
			<a ng-click="access_json('jy_jdk/index/')">
				<img src="../addons/jy_jdk/custom/templates/mobile/img/back.png" style="width: 0.25rem;height: 0.4rem;display:inline-block;float: left;margin-top: 0.3rem;margin-left: 0.4rem"
				 alt="">
			</a>
			<span style="color: #fff;font-size: 23px;text-align: center;display: inline-block;float: left;line-height: 1rem ;padding-left: 30%">提交订单</span>
		</header>



<!-- 选项卡 -->

<div style="width: 100%;background: #fff;line-height: 0.8rem;height: 0.8rem">
  <a  id="left-1" class="active"  href="###" style="width: 50%;text-align: center;display: inline-block;float: left;font-size: 14px;">提交订单</a>
  <a id="right-1" href="###" style="width: 50%;text-align: center;display: inline-block;float: right;font-size: 14px;">订单列表</a>
</div>

<!-- 第1页 -->
<div id="onepage" style="display: block">

		<div class="in-ti" style="height: 0.6rem;width: 100%;padding-left: 0.2rem;line-height: 0.6rem;background: #f7f7f7">
			<span style="font-size: 10px">订单号<span style="color: red;font-size: 10px">(系统验证订单号后可以免费拿)</span></span>
		</div>
		<div class="content" style="background: #FFF;width: 100%;height: 0.8rem;">
			<input type="text" id="jduniacid" placeholder="请复制订单号到这里"style="border: none;height: 100%;width: 100%;padding-left: 0.2rem;line-height: 0.8rem;border-bottom: 1px solid #f1f1f1;border-top: 1px solid #f1f1f1" value="">
		</div>
		<div class="in-put" style="width: 100%;height: 1rem;background: #fff;padding-top:0.1rem">

		<input class="inn" type="button" value="提交" style="width: 80%; height: 0.8rem;font-size: 0.4rem;line-height: 0.8rem;background:#FE6260;color: #fff;position: absolute; left: 10%;border-radius: 0.1rem">
			</div>
		<div class="ti" style="display:none;background: #555;color: #fff;text-align: center;border-radius: 0.1rem;width: 1.5rem;height: 0.8rem;line-height: 0.8rem; position: absolute;top: 45%;left: 40%">提交成功</div>
</div>


<!-- 第2页 -->
<div id="twopage" style="display:none">
	
		<div ng-repeat="o in pagedata.order" style="background: #fff;width: 100%;height: 0.6rem;">
		<div  style="height: 0.6rem;width: 90%;padding-left: 0.2rem;line-height: 0.6rem;background: #fff;margin:0.02rem 5%">
			<span style="color:#b2b2b2;">订单号:<input type="text" id="dan" value="{$o['orderno']}"style=" color:#b2b2b2 ;border: none;outline: none;display: inline-block;">
			</span>
			<span style="color:#89C4A6;red;display: inline-block;float: right;padding-right: 0.1rem" id="dates">{{o.createtime}}</span>
		</div>
		</div>
		</div>
<script>
 $("#left-1").on("click",function(){
     	 $("#left-1").addClass('active');
     	 $("#right-1").removeClass('active');
     	 $("#onepage").css({display:"block"});
     	 $("#twopage").css({display:"none"});

     });
 $("#right-1").on("click",function(){
     	 $("#right-1").addClass('active');
     	 $("#left-1").removeClass('active');
     	  $("#onepage").css({display:"none"});
     	 $("#twopage").css({display:"block"});

     })

</script>
<script>
	var posturl = "jy_jdk/freeorderapi/ajaxFreeordersubmit";
	$(function () {
		$(".inn").on("click", function () {
			var jduniacid=$("#jduniacid").val();
			if(jduniacid==""){
				alert("订单号不能为空");
				return;
			}
			console.log(jduniacid);
			$.ajax({
				url:posturl,
				type:'post',
				data:{'orderno':jduniacid},
				success:function(res){
                       	var data=JSON.parse(res)
						console.log(data)
                       	
                       if(data.message==="success"){
						alert("添加成功！");
						location.reload();
                       }else{
						alert(data.res);
					   }
				}
			});
		});
	})

</script>
<script>

</script>